﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="OrgTree_Other_View.aspx.cs" Inherits="SysManage_OrgTree_Other_View" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
 <title>部门查看</title>
    <base target ="_self" />
    <link rel="stylesheet" href="../css/css.css" type="text/css" />
    <!--#include file="../JS/TrimData.js"--> 
    <!--#include file="../JS/TDTextBoxControl.js"-->    
</head>
<body leftmargin ="0" rightmargin ="0" topmargin ="0"  style =" background-image :url('../images/hit_bg.gif');">
<% 
  Response .ExpiresAbsolute=System.DateTime.Now. AddSeconds(-1);
  Response.Expires=0;
  Response.CacheControl = "no-cache";
%>
    <form id="form1" method ="post" runat="server">
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="15%" height="18" valign="top" background="../images/tablelb.gif" class="font13"> 
      <div align="left"><img height=18 src="../images/tablelbleft.gif" width="18" alt ="" /></div></td>
    <td width="2%" valign="top" background="../images/tablelb.gif" bgcolor="#ffffff" class="font13"> 
      <div align="right"><img height=18 src="../images/tablelbright.gif" width="12" alt ="" /></div></td>
    <td colspan="2" valign="center" bgcolor="#ffffff" class="font13"> <div align="right"> 
      </div></td>
  </tr>
  <tr> 
    <td height="26" colspan="2" valign="center" bgcolor="#e9ecf5" class="font13"> 
      <div align="center">部门查看</div></td>
    <td width="80%" height="26" valign="bottom" background="../images/tddi.gif" class="font13"> 
      <div align="right"> </div></td>
    <td width="3%" valign="top" background="../images/tddi.gif" class="font13"> 
      <div align="right"><IMG height=26 src="../images/tddir.gif"></div></td>
  </tr>
</table>
<table width="98%" height="107" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#e9ecf5">
  <tr> 
    <td height="147"  valign="top"> 
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="tablelsdi">
          <tr> 
            <td width="4%" background="../images/tablelb01.gif"><img src="../images/tablelb01-left.gif" width="21" height="22" alt ="" /></td>
            <td width="82%" background="../images/tablelb01.gif" class="font12w">部门查看</td>
            <td width="14%" background="../images/tablelb01.gif"> <div align="right"><img src="../images/tablelb01-right.gif" width="21" height="22" alt ="" /></div></td>
          </tr>
        </table>
    <table width="95%" border="1" align="center" cellpadding="0" cellspacing="0" class="tablelb" style ="border-collapse :collapse ;">
      <tr style ="height :26px;">
        <td style="width :15%;" bgcolor="#ECF4FD" class="tableleft"  align ="right">上级部门&nbsp;</td>
        <td style="width :35%;" bgcolor="#ECF4FD" class="tableleft"><asp:Label id="OrgName1" runat ="server" ForeColor="Blue" ></asp:Label></td>
        <td style="width :15%;" bgcolor="#ECF4FD" class="tableleft" align ="right" >部门名称&nbsp;</td>
        <td style="width :35%;" bgcolor="#ECF4FD" class="tableleft"><asp:Label id="DeptName1" runat ="server" ForeColor="Blue" ></asp:Label></td>
      </tr>
      <tr style ="height :26px;">
        <td bgcolor="#E1EEFD" class="tableleft" align ="right" >负责人&nbsp;</td>
        <td bgcolor="#E1EEFD" class="tableleft"><asp:Label id="PersName1" runat ="server" ForeColor="Blue" ></asp:Label></td>
        <td bgcolor="#E1EEFD" class="tableleft" align ="right" >排序号&nbsp;</td>
        <td bgcolor="#E1EEFD" class="tableleft"><asp:Label id="DOrder" runat ="server" ForeColor="Blue" ></asp:Label></td>
      </tr>
      <tr style ="height :26px;">
        <td bgcolor="#ECF4FD" class="tableleft" align ="right" >电话&nbsp;</td>
        <td bgcolor="#ECF4FD" class="tableleft"><asp:Label id="Phone" runat ="server" ForeColor="Blue" ></asp:Label></td>
        <td bgcolor="#ECF4FD" class="tableleft" align ="right" >传真&nbsp;</td>
        <td bgcolor="#ECF4FD" class="tableleft"><asp:Label id="Fax" runat ="server" ForeColor="Blue" ></asp:Label></td>
      </tr>
        <tr style="height: 26px">
            <td align="right" bgcolor="#ecf4fd" class="tableleft">
                邮编</td>
            <td bgcolor="#ecf4fd" class="tableleft">
                <asp:Label ID="PostID" runat="server" ForeColor="Blue"></asp:Label></td>
            <td align="right" bgcolor="#ecf4fd" class="tableleft">
                地址</td>
            <td bgcolor="#ecf4fd" class="tableleft">
                <asp:Label ID="Address" runat="server" ForeColor="Blue"></asp:Label></td>
        </tr>
        <tr style="height: 26px">
            <td align="right" bgcolor="#ecf4fd" class="tableleft" style="height: 26px">
                网址</td>
            <td bgcolor="#ecf4fd" class="tableleft" style="height: 26px">
                <asp:Label ID="WebSite" runat="server" ForeColor="Blue"></asp:Label></td>
            <td align="right" bgcolor="#ecf4fd" class="tableleft" style="height: 26px">
                工作组</td>
            <td bgcolor="#ecf4fd" class="tableleft" style="height: 26px">
                <asp:Label ID="WorkGroup" runat="server" ForeColor="Blue"></asp:Label></td>
        </tr>
        <tr style="height: 26px">
            <td align="right" bgcolor="#ecf4fd" class="tableleft">
                类别</td>
            <td bgcolor="#ecf4fd" class="tableleft">
                <asp:Label ID="Category" runat="server" ForeColor="Blue"></asp:Label>
                <asp:DropDownList ID="Type" runat="server" DataTextField="param_name" DataValueField="param_value"
                    TabIndex="6">
                </asp:DropDownList></td>
            <td align="right" bgcolor="#ecf4fd" class="tableleft">
                组织性质</td>
            <td bgcolor="#ecf4fd" class="tableleft">
                <asp:Label ID="OrgKind" runat="server" ForeColor="Blue"></asp:Label>
                <asp:DropDownList ID="org_character" runat="server" DataTextField="param_name" DataValueField="param_value"
                    TabIndex="6">
                </asp:DropDownList></td>
        </tr>
        <tr style="height: 26px">
            <td align="right" bgcolor="#ecf4fd" class="tableleft">
                组织级别</td>
            <td bgcolor="#ecf4fd" class="tableleft">
                <asp:Label ID="OrgLevel" runat="server" ForeColor="Blue"></asp:Label>
                <asp:DropDownList ID="org_Level" runat="server" DataTextField="param_name" DataValueField="param_value"
                    TabIndex="6">
                </asp:DropDownList></td>
            <td align="right" bgcolor="#ecf4fd" class="tableleft">
                组织类别&nbsp;</td>
            <td bgcolor="#ecf4fd" class="tableleft">
                <asp:Label ID="OrgCategory" runat="server" ForeColor="Blue"></asp:Label>
                <asp:DropDownList ID="org_Sort" runat="server" DataTextField="param_name" DataValueField="param_value"
                    TabIndex="6">
                </asp:DropDownList></td>
        </tr>
        <tr style="height: 26px">
            <td align="right" bgcolor="#ecf4fd" class="tableleft">
                组织类型</td>
            <td bgcolor="#ecf4fd" class="tableleft">
                <asp:Label ID="OrgType" runat="server" ForeColor="Blue"></asp:Label>
                <asp:DropDownList ID="orgTypes" runat="server" DataTextField="param_name" DataValueField="param_value"
                    TabIndex="6">
                </asp:DropDownList></td>
            <td align="right" bgcolor="#ecf4fd" class="tableleft">
                是否独立核算</td>
            <td bgcolor="#ecf4fd" class="tableleft">
                <asp:Label ID="IsSelfCalc" runat="server" ForeColor="Blue"></asp:Label></td>
        </tr>
      <tr style ="height :26px;">
        <td bgcolor="#E1EEFD" class="tableleft"  align ="right">是否有效&nbsp;</td>
        <td bgcolor="#E1EEFD" class="tableleft" colspan ="3"><asp:Label id="Effective" runat ="server" ForeColor="Blue" ></asp:Label></td>
       </tr>
       <tr>
        <td bgcolor="#ECF4FD" class="tableleft" align="right"><input type="checkbox" name="Continue" id="IfsaveDeptHistoryInfo" runat ="server" onclick ="if(this.checked==true){DivHistoryDesc.style.display='';var vButton2=window.document.getElementById('HistoryInfo'); if(vButton2!=null){vButton2.focus();vButton2.click();} } else{DivHistoryDesc.style.display='none';}"  /></td>
        <td bgcolor="#ECF4FD" class="tableleft" colspan ="3">查看历史信息</td>
      </tr>
       </table>      
    <div id="DivHistoryDesc" style="DISPLAY:none" runat ="server" >
       <table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" class="tablelb" style ="border-collapse :collapse ;">
         <tr>
          <td bgcolor="#ECF4FD" class="tableleft" align="right">          
          <asp:GridView ID="GridView1" runat="server" CellPadding="0" ForeColor="#333333" DataKeyNames="ID" PageSize ="15"
            Width="99%" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"  OnPageIndexChanging="GridView1_PageIndexChanging"  Font-Bold="False" HorizontalAlign="Center" BorderColor="White" OnRowDataBound="GridView1_RowDataBound" OnRowCreated="GridView1_RowCreated" EmptyDataText="没有历史信息">
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="White" ForeColor="#333333" Height="22px" />            
            <PagerStyle BackColor="White" ForeColor="#333333" HorizontalAlign="Right" Wrap="False" />
            <HeaderStyle BackColor="#99CCFF" Font-Bold="True" ForeColor="Black" Height="23px" />
            <AlternatingRowStyle BackColor="AliceBlue" />
            <Columns>
              <asp:TemplateField>
                  <ItemTemplate><%#(Container.DataItemIndex+1) %></ItemTemplate>              
                  <HeaderStyle HorizontalAlign="center" Width="5%" />
              </asp:TemplateField>
              <asp:BoundField DataField="Descr" HeaderText="变更说明">
                   <ItemStyle HorizontalAlign="left" />
                   <HeaderStyle HorizontalAlign ="center"  />
              </asp:BoundField>            
            </Columns>
           <PagerSettings FirstPageImageUrl="img/BeginPage.gif" LastPageImageUrl="img/EndPage.gif"
            NextPageImageUrl="img/NextPage.gif" PreviousPageImageUrl="img/PrePage.gif" Mode="NextPreviousFirstLast" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PreviousPageText="上一页" />
                 <EmptyDataRowStyle HorizontalAlign="Center" />
            </asp:GridView>
          
          </td>
         </tr>
      </table>
      </div> 
      <table  width="95%" border="0" cellpadding="5" cellspacing="0" align="center" >
      <tr>
        <td align ="center" ><input type ="button" id="backBtn"  value ="返回(C)" accesskey ="c" class="button03" tabindex ="9" onclick ="window.close();" /></td>
      </tr>
    </table>
      <asp:Button ID="HistoryInfo" runat="server" Text="Button" Height="0px" Width="0px" OnClick="HistoryInfo_Click" />
    <input type="hidden" id="hOrgID1" runat ="server"  />
    <input type="hidden" id="hNewOrgID1" runat ="server" />
    <input type="hidden" id="hOldOrgName" runat ="server" />
          <input type="hidden" id="hOldParentID1" runat ="server"  />
          <input type="hidden" id="hNewParentID1" runat ="server"  />
          <input type="hidden" id="hidEditType" runat ="server" />
          <input type="hidden" id="hEffective" runat ="server" />
          <input type="hidden" id="hPersID1" runat ="server" />          
          <input type="hidden" id="NewPersID1" runat="server" />
          <input type="hidden" id="HOrgType" runat ="server"  />
          <input type="hidden" id="HOldDeptID" runat ="server"  />
    </form>
    <script language ="javascript" type="text/javascript" >
    <!--
    function jsTrim(str)
    {
        return str.replace(/(^\s*)|(\s*$)/g, ""); 
    }
      var sData = dialogArguments;
      form1.hidEditType.value = sData.stype ;
      var sobj = sData.OrgForm.Hcode.value;  
      var ary=sobj.split('|');
      form1.HOldDeptID.value = ary[12];    //历史记录的部门
      if(ary[11] == "")
      {
          window.document.all.OrgName1.innerText="顶级组织";
      }
      else
      {
          window.document.all.OrgName1.innerText=ary[11];
      }
      window.document.all.DeptName1.innerText=ary[1];
      window.document.all.PersName1.innerText=ary[8];
      window.document.all.DOrder.innerText=ary[5];
      window.document.all.Phone.innerText=ary[6];
      window.document.all.Fax.innerText=ary[9];
      if(ary[10] == "1")
      {
          window.document.all.Effective.innerText="是";
      }
      else
      {
          window.document.all.Effective.innerText="否";
      }
      document.all.PostID.innerText=ary[13];
      document.all.Address.innerText=ary[14];
      document.all.WebSite.innerText=ary[15];
      document.all.WorkGroup.innerText=ary[16];
      if(ary[19] == "0")
      {
          window.document.all.OrgLevel.innerText="";
      }
      else
      {
      document.all.org_Level.value=jsTrim(ary[19]);
      if(document.all.org_Level.selectedIndex != -1)
      window.document.all.OrgLevel.innerText= document.all.org_Level.options[document.all.org_Level.selectedIndex].text;
      }
      if(ary[20] == "0")
      {
          window.document.all.OrgCategory.innerText="";
      }
      else
      {
      document.all.org_Sort.value=jsTrim(ary[20]);
      if(document.all.org_Sort.selectedIndex != -1)
      window.document.all.OrgCategory.innerText= document.all.org_Sort.options[document.all.org_Sort.selectedIndex].text;
      }
      if(ary[21] == "0")
      {
          window.document.all.OrgType.innerText="";
      }
      else
      {
      document.all.orgTypes.value=jsTrim(ary[21]);
      if(document.all.orgTypes.selectedIndex != -1)
      window.document.all.OrgType.innerText= document.all.orgTypes.options[document.all.orgTypes.selectedIndex].text;
      }
      if(ary[22] == "1")
      {
          window.document.all.IsSelfCalc.innerText="是";
      }
      else
      {
          window.document.all.IsSelfCalc.innerText="否";
      }
      if(ary[18] == "0")
      {
          window.document.all.OrgKind.innerText="";
      }
      else
      {
      document.all.org_character.value=ary[18];
      if(document.all.org_character.selectedIndex != -1)
      window.document.all.OrgKind.innerText= document.all.org_character.options[document.all.org_character.selectedIndex].text;
      }
       if(ary[17] == "0")
      {
//          window.document.all.Category.innerText="";
      }
      else
      {
      document.all.Type.value=ary[17];
      if(document.all.Type.selectedIndex != -1)
      window.document.all.Category.innerText= document.all.Type.options[document.all.Type.selectedIndex].text;
      }
//      alert(ary);
//      alert(document.all.org_Level.options[document.all.org_Level.selectedIndex].text);
      
      document.all.Type.style.display='none';
      document.all.org_character.style.display='none';
      document.all.orgTypes.style.display='none';
      document.all.org_Sort.style.display='none';
      document.all.org_Level.style.display='none';
   -->
    </script>    
</body>
</html>
